package com.qy.service.impl;

import com.qy.dao.UnitMapper;
import com.qy.model.Evaluation;
import com.qy.model.Unit;
import com.qy.service.UnitService;
import com.qy.base.core.AbstractService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * Created by zaq on 2018/07/10.
 */
@Service
@Transactional
public class UnitServiceImpl extends AbstractService<Unit> implements UnitService {
    @Resource
    private UnitMapper qyUnitMapper;

    @Override
    public List<Unit> selectAllUnit(Unit unit) {
        return qyUnitMapper.selectAllUnit(unit);
    }

    @Override
    public List<Unit> selectUnitById(Unit unit) {
        return qyUnitMapper.selectUnitById(unit);
    }

    @Override
    public List<Map> unitList(Unit unit) {
        return qyUnitMapper.unitList(unit);
    }

    @Override
    public void updateUnit(Unit unit) {
        qyUnitMapper.updateUnit(unit);
    }

    @Override
    public void deleteUnit(Unit unit) {
        qyUnitMapper.deleteUnit(unit);
    }

    @Override
    public void unitState(Unit unit) {
        qyUnitMapper.unitState(unit);
    }

    @Override
    public List<Unit> selectUnitByName(Unit unit) {
        return qyUnitMapper.selectUnitByName(unit);
    }

    @Override
    public List<Map<String,Object>> selectByClueId(Integer clue_id) {
        return qyUnitMapper.selectByClueId(clue_id);
    }

    @Override
    public List<Unit> selectUnitListByProvince(Evaluation evaluation) {
        return qyUnitMapper.selectUnitListByProvince(evaluation);
    }

    @Override
    public List<Map> selectUnitName() {
        return qyUnitMapper.selectUnitName();
    }

    @Override
    public List<Map> selectVagueUnitName(String unit_name) {
        return qyUnitMapper.selectVagueUnitName(unit_name);
    }

}
